<?php require('header.tpl.php'); ?>

  <?php if ($page['sidebar_first']): ?>
    <div id="sidebar-first" class="column sidebar"><div class="section">
      <?php print render($page['sidebar_first']); ?>
    </div></div> <!-- /.section, /#sidebar-first -->
  <?php endif; ?>

  <div id="content" class="column"><div class="section">
    <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
    <a id="main-content"></a>

    <?php print render($page['help']); ?>
    <?php if ($action_links): ?>
      <ul class="action-links">
        <?php print render($action_links); ?>
      </ul>
    <?php endif; ?>



    <?php if (!empty($channel_slideshow)): ?>
       <?php print $channel_slideshow; ?>
    <?php endif; ?>

    <?php print render($page['content']); ?>
    <?php print $feed_icons; ?>

    <?php if(!empty($channel)) : ?>

    <div class="region region-full">
      <div class="region-content">
        <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_top_wide'); ?>
        <?php print $block['content']; ?>
      </div>
    </div>

    <div class="region region-full">
      <div class="region-content">
        <div class="region region-half">
          <div class="region-content region-content-left">
            <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_top_left'); ?>
            <?php print $block['content']; ?>
          </div>
        </div>

        <div class="region region-half">
          <div class="region-content region-content-left">
            <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_top_right'); ?>
            <?php print $block['content']; ?>
          </div>
        </div>
      </div>
    </div>

    <div class="region region-full">
      <div class="region-content">
        <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_middle_wide'); ?>
        <?php print $block['content']; ?>
      </div>
    </div>

    <div class="region region-full">
      <div class="region-content">
        <div class="region region-half">
          <div class="region-content region-content-left">
            <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_middle_left'); ?>
            <?php print $block['content']; ?>
          </div>
        </div>

        <div class="region region-half">
          <div class="region-content region-content-left">
            <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_middle_right'); ?>
            <?php print $block['content']; ?>
          </div>
        </div>
      </div>
    </div>

    <div class="region region-full">
      <div class="region-content">
        <?php $block = module_invoke('addon_blocks', 'block_view', $channel . '_bottom_wide'); ?>
        <?php print $block['content']; ?>
      </div>
    </div>

    <?php endif; ?>

  </div></div> <!-- /.section, /#content -->

  <?php if ($page['sidebar_second']): ?>
    <div id="sidebar-second" class="column sidebar"><div class="section">
      <?php print render($page['sidebar_second']); ?>
    </div></div> <!-- /.section, /#sidebar-second -->
  <?php endif; ?>

<?php require('footer.tpl.php'); ?>

<?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
  <div id="triptych-wrapper"><div id="triptych" class="clearfix">
    <?php print render($page['triptych_first']); ?>
    <?php print render($page['triptych_middle']); ?>
    <?php print render($page['triptych_last']); ?>
  </div></div> <!-- /#triptych, /#triptych-wrapper -->
<?php endif; ?>




